# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Josip Ponjavic <josipponjavic at gmail dot com>
# Contributor: Xu Fasheng <fasheng.xu[AT]gmail.com>

pkgname=deepin-launcher
pkgver=6.0.18
pkgrel=1
pkgdesc='Deepin desktop-environment - Launcher module'
arch=('loong64' 'x86_64')
url="https://github.com/linuxdeepin/dde-launcher"
license=('GPL3')
depends=('gsettings-qt' 'qt5-svg' 'qt5-x11extras' 'startdde' 'deepin-qt5integration' 'deepin-menu'
         'deepin-daemon' 'dtkcore' 'dtkgui' 'dtkwidget' 'dconf' 'glib2' 'qt5-base' 'libxcb'
         'xcb-util-wm' 'gcc-libs' 'xdg-user-dirs' 'deepin-application-manager' 'deepin-appearance')
makedepends=('cmake' 'gmock' 'gtest' 'ninja' 'qt5-tools')
conflicts=('dde-launcher')
replaces=('dde-launcher')
groups=('deepin')
source=("https://github.com/linuxdeepin/dde-launcher/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('4c7c889d878a338d4308a22afae70533dc559907d362df1668669db07760b4426caf781f785bf111a977b98d8c40fcc7f26534083f79c8286195ed4d516d16fd')

prepare() {
  cd dde-launcher-$pkgver

  sed -i 's|/usr/share/backgrounds/default_background.jpg|/usr/share/backgrounds/deepin/desktop.jpg|' src/boxframe/*.cpp
}

build() {
  cd dde-launcher-$pkgver
  cmake . -GNinja -DCMAKE_INSTALL_PREFIX=/usr -DWITHOUT_UNINSTALL_APP=
  ninja
}

check() {
  cd dde-launcher-$pkgver
  # ninja test
}

package() {
  cd dde-launcher-$pkgver
  DESTDIR="$pkgdir" ninja install
}
